﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TileMapEditor.EditorForms
{
    public partial class MapCreator : Form
    {
        private TileEditor owner;

        public MapCreator(TileEditor owner)
        {
            InitializeComponent();
            this.owner = owner;
        }

        private void MapCreator_Load(object sender, EventArgs e)
        {

        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnAccept_Click(object sender, EventArgs e)
        {
            owner.SetMap(new TileEngine.Map(int.Parse(txtMapWidth.Text), int.Parse(txtMapHeight.Text), int.Parse(txtTileWidth.Text), int.Parse(txtTileHeight.Text)));
            this.Close();
        }
    }
}
